﻿using CRM.Infrastructure.Dto.Request;
using CRM.Infrastructure.Dto.Response.Room;
using CRM.Service.Instance;
using CRM.Service.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace CRM.Api.Admin.Controllers
{
    public class RoomController : BaseController
    {
        private readonly I_Room_Service _room_Service;
        public RoomController(I_Room_Service room_Service, I_Login_Service login_Service) : base(login_Service)
        {
            _room_Service = room_Service;
        }
        [HttpPost]
        public async Task<IActionResult> Open_Room(OpenRoomRequest request)
        {
            var result = await _room_Service.Open_Room(request);
            return Ok(result);
        }
        [HttpGet]
        public async Task<IActionResult> Get_Project(int page = 1, int limit = 4)
        {
            var result = await _room_Service.Get_Project( page, limit);
            return Ok(result);
        }
        [HttpPost]
        public async Task<IActionResult> Settlement_Room(string id)
        {
            var result = await _room_Service.Settlement_Room(id);
            return Ok(result);
        }
        

    }
}
